/*
 *  SPAGL Copyright (C) 2008 Sam Pottinger
 *  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 
 *  General Public License as published by the Free Software Foundation; either version 2.1 of the License, or 
 *  (at your option) any later version. This library is distributed in the hope that it will be useful, but 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 *  See the GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License along with this library; if not, 
 *  write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 */

package spagcore;

/**
 * Standardized interface for an "entry box" / "text field" widget
 * @author Sam Pottinger
 */
public interface SpaglCoreField extends SpaglCoreWidget, SpaglFontCapable, SpaglCoreEventGenerator {
	
	/**
	 * Set the text of the field
	 * 
	 * @param newText the text that will be displaced on the face of the widget
	 */
	public void setText(String newText);
	
	/**
	 * Gets the text entered by the user and/or is being displayed on the face of the widget
	 * @return A string representation of the text in the widget
	 */
	public String getText();
	
	/**
	 * Toggles if a text field is read only or not
	 * @param b True if the field is editable and false if it is not
	 */
	public void setEditable(boolean b);
	
	/**
	 * Determines the editable status of this text field
	 * @return True if the text field is editable or false if it is not
	 */
	public boolean isEditable();

}
